<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>身份认证</title>
		<link rel="stylesheet" href="../asset/css/conmom.css" />
		<link rel="stylesheet" href="../asset/css/following.css" />
		<link rel="stylesheet" href="../asset/css/base.css" />
		<style>
			html,body{background: #fff;}
		</style>
	</head>
	<body>
		<div class="following">
			<div class="J_tit">
				<div class="J_tit_div" style="position: initial;">
					<div class="title"><i class="iconfont back icon-xiangzuo2" onclick="window.history.go(-1)"></i>身份认证</div>
				</div>
			</div>
			<div class="following-info">
				<form class="wall-from">
					<div class="wall-form-item">
						<label>公司全称</label>
						<div class="wall-input-block">
							<input type="text" required oninvalid="setCustomValidity('公司名不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>公司简称</label>
						<div class="wall-input-block">
							<input type="text" required oninvalid="setCustomValidity('公司简称不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>营业执照号</label>
						<div class="wall-input-block">
							<input type="text" required oninvalid="setCustomValidity('营业执照号不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>企业法人</label>
						<div class="wall-input-block">
							<input type="text" required oninvalid="setCustomValidity('请填写企业法人');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>身份证号</label>
						<div class="wall-input-block">
							<input type="text" required oninvalid="setCustomValidity('身份证号码不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>工行账号</label>
						<div class="wall-input-block">
							<input type="text" required oninvalid="setCustomValidity('请填写工行账号');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>注册手机号</label>
						<div class="wall-input-block">
							<input type="text" required oninvalid="setCustomValidity('手机号码不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>省份</label>
						<div class="wall-input-block">
							<input type="number" required oninvalid="setCustomValidity('省份不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>城市</label>
						<div class="wall-input-block">
							<input type="number" required oninvalid="setCustomValidity('城市不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>县/区</label>
						<div class="wall-input-block">
							<input type="number" required oninvalid="setCustomValidity('县/区不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="wall-form-item">
						<label>详细地址</label>
						<div class="wall-input-block">
							<input type="number" required oninvalid="setCustomValidity('详细地址不能为空');" oninput="setCustomValidity('');"/>
						</div>
					</div>
					<div class="clearfix">
						<div class="fl lodimg">
							<div class="border-img">
								<img src="../asset/img/xiangji.png" class="imgInfo"/>
							 	<input type="file" class="browerfile" style="display: none;">
								<a class="delete" style="display: none;"><i class="icon iconfont icon-iconfonticonfontclose shanchu"></i></a>
							</div>
							<p class="text-center">营业执照</p>
						</div>
						<div class="fr lodimg">
							<div class="border-img">
								<img src="../asset/img/xiangji.png" class="imgInfo"/>
								<input type="file" class="browerfile" style="display: none;">
								<a class="delete" style="display: none;"><i class="icon iconfont icon-iconfonticonfontclose shanchu"></i></a>
							</div>
							<p class="text-center">法人身份证正面</p>
						</div>
					</div>
					<div class="clearfix">
						<div class="fl lodimg">
							<div class="border-img">
								<img src="../asset/img/xiangji.png" class="imgInfo"/>
								<input type="file" class="browerfile" style="display: none;">
								<a style="display: none;"><i class="icon iconfont icon-iconfonticonfontclose shanchu"></i></a>
							</div>
							<p class="text-center">工厂实景</p>
						</div>
						<div class="fr lodimg">
							<div class="border-img">
								<img src="../asset/img/xiangji.png" class="imgInfo"/>
								<input type="file" class="browerfile" style="display: none;">
								<a class="delete" style="display: none;"><i class="icon iconfont icon-iconfonticonfontclose shanchu"></i></a>
							</div>
							<p class="text-center">收款盖章证明</p>
						</div>
					</div>
					<button class="submit">提交</button>
				</form>
			</div>
			<!--底部-->
			<div class="clearfix bottom-box">
				<a>
					<div class="bottom-icon"><i class="iconfont icon icon-dingdan"></i></div>
					<div class="bottom-title">订单管理</div>
				</a>
				<a>
					<div class="bottom-icon"><i class="iconfont icon icon-suoyou"></i></div>
					<div class="bottom-title">产品管理</div>
				</a>
				<a class="active">
					<div class="bottom-icon"><i class="iconfont icon icon-kehuliebiao"></i></div>
					<div class="bottom-title">个人中心</div>
				</a>
			</div>
			<!--底部-->
		</div>
	</body>
	<script type="text/javascript" src="../public/jquery.min.js" ></script>
	<script>
	/*$(function() {
		$(".browerfile").change(function(){
	    var path = browerfile.value;
	    var objUrl = getObjectURL(this.files[0]);
	    if(objUrl){
	      $('.imgInfo').attr("src",objUrl);
	    }
	  })
	});*/
	$(function() {
		$(".imgInfo").click(function() {
			$(this).siblings(".browerfile").click();//隐藏了input:file样式后，点击头像就可以本地上传
			$(this).siblings(".browerfile").on("change", function() {
				var objUrl = getObjectURL(this.files[0]); //获取图片的路径，该路径不是图片在本地的路径
				if(objUrl) {//判断对象是否存在
					$(this).siblings(".imgInfo").attr("src", objUrl); //将图片路径存入src中，显示出图片
					$(this).siblings("a").show();
					$(".delete").click(function(){
						$(this).hide();
						$(".imgInfo").attr("src", "../asset/img/xiangji.png");
						$(".imgInfo").next().hide();
						
					})
				}
			});
		});
	});	
	//建立一個可存取到該file的url
	function getObjectURL(file) {
		var url = null;
		if(window.createObjectURL != undefined) { // basic
			url = window.createObjectURL(file);
		} else if(window.URL != undefined) { // mozilla(firefox)
			url = window.URL.createObjectURL(file);
		} else if(window.webkitURL != undefined) { // webkit or chrome
			url = window.webkitURL.createObjectURL(file);
		}
	return url;
}</script>
</html>
